Closed Bug 1398513 Opened 8 years ago Closed 8 years ago

IsTokenSane: comparison of unsigned enum expression < 0 is always false [-Werror,-Wtautological-unsigned-zero-compare]

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: Sylvestre, Assigned: Sylvestre)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

clang trunk as a new warning -Wtautological-unsigned-zero-compare I am running some daily ci to check that fx builds with clang with the warning as error. This is failing on: /data/jenkins/workspace/firefox-clang-last/js/src/frontend/TokenStream.cpp:1180:18: error: comparison of unsigned enum expression < 0 is always false [-Werror,-Wtautological-unsigned-zero-compare] if (tp->type < 0 || tp->type >= TOK_LIMIT || tp->type == TOK_EOL) ~~~~~~~~ ^ ~
Comment on attachment 8906310 [details] Bug 1398513 - IsTokenSane: Remove an useless comparison: < 0 with an unsigned is always false https://reviewboard.mozilla.org/r/178042/#review182982 thanks!
Attachment #8906310 - Flags: review?(arai.unmht) → review+
Pushed by sledru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/776e69666d0c IsTokenSane: Remove an useless comparison: < 0 with an unsigned is always false r=arai
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
No longer blocks: clang-based-analysis
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: